<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.psd.demo.model.*"  %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Untitled Page</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<style type="text/css">
<!--
body {
	font-family: Arial, Helvetica, sans-serif;
	font-size:12px;
	color:#666666;
	background:#fff;
	text-align:center;

}

* {
	margin:0;
	padding:0;
}

a {
	color:#1E7ACE;
	text-decoration:none;	
}

a:hover {
	color:#000;
	text-decoration:underline;
}
h3 {
	font-size:14px;
	font-weight:bold;
}

pre,p {
	color:#1E7ACE;
	margin:4px;
}
input, select,textarea {
	padding:1px;
	margin:2px;
	font-size:11px;
}
.select{
	width:140px;
	font-size:14px;	
	
	}
.buttom{
	padding:1px 10px;
	font-size:12px;
	border:1px #1E7ACE solid;
	background:#D0F0FF;
}
#formwrapper {
	width:450px;
	margin:15px auto;
	padding:20px;
	text-align:left;
	border:1px #1E7ACE solid;
}

fieldset {
	padding:10px;
	margin-top:5px;
	border:1px solid #1E7ACE;
	background:#fff;
}

fieldset legend {
	color:#1E7ACE;
	font-weight:bold;
	padding:3px 20px 3px 20px;
	border:1px solid #1E7ACE;	
	background:#fff;
}

fieldset label {
	float:left;
	width:120px;
	text-align:right;
	padding:4px;
	margin:1px;
}

fieldset div {
	clear:left;
	margin-bottom:2px;
}

.enter{ text-align:center;}
.clear {
	clear:both;
}

-->
</style>
<script type="text/javascript" src="../js/jquery-1.7.1.js"></script>



<script src="prototype-1.6.0.3.js"></script>
<script type="text/javascript">
	$(function(){
			$("#button").click(function(){
			var userId =  $.trim($("#userId").val());
			var userPass = $.trim($("#userPass").val());
			var userName = $.trim($("#userName").val());
			
			if(userId == ""){
				alert("用户名不能为空!");
				return;
			}
			if(userPass == ""){
				alert("密码不能为空!");
				return;
			}
			if(userName == ""){
				alert("请输入真是姓名!");
				return;
			}
			
			$("#apForm").submit();	
		});
	
	});
	function vilidateUser(){
		$("font").empty();
		var params={
			userId:$.trim($("#userId").val())
		};
		$.ajax({
			  type: "POST",
			  url: "validateUser.action",
			  dataType:'json',
			  data:params,
			  success:function(data){
			  	if(data=="0"){
			  		$("#userId").after("<font color='red'>*用户名已经存在！</font>");
			  		$("#userId").focus();
			  	}else{
			  		$("#userId").after("<font color='green'>此用户名可注册！！</font>");
			  	}
			  }		
		});
	}
	
	function getSelectDepOption(index){
		var arr=new Array;
		arr[0]=[new Option('请选择',-1)];
		arr[1]=[new Option('','')];
	}
	
</script>

<META content="MSHTML 6.00.2900.5848" name=GENERATOR>
</HEAD>
<BODY 
style="BACKGROUND-POSITION-Y: -120px; BACKGROUND-IMAGE: url(../images/bg.gif); BACKGROUND-REPEAT: repeat-x">


<DIV>
  <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TBODY>
      <TR 
  style="BACKGROUND-IMAGE: url(../images/bg_header.gif); BACKGROUND-REPEAT: repeat-x" 
  height=47>
        <TD width=10><SPAN 
      style="FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hl.gif); WIDTH: 15px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN></TD>
        <TD><SPAN 
      style="FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hl2.gif); WIDTH: 15px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN><SPAN 
      style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hb.gif); PADDING-BOTTOM: 10px; COLOR: white; PADDING-TOP: 10px; BACKGROUND-REPEAT: repeat-x; HEIGHT: 47px; TEXT-ALIGN: center; 0px: ">新用户注册</SPAN><SPAN 
      style="FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hr.gif); WIDTH: 60px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN></TD>
        <TD 
    style="BACKGROUND-POSITION: 50% bottom; BACKGROUND-IMAGE: url(../images/main_rc.gif)" 
    width=10></TD>
      </TR>
      <TR>
        <TD style="BACKGROUND-IMAGE: url(../images/main_ls.gif)">&nbsp;</TD>
        <TD 
    style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; COLOR: #566984; PADDING-TOP: 10px; BACKGROUND-COLOR: white" 
    vAlign=top align=middle>
          <DIV>
            <TABLE class=gridView id=ctl00_ContentPlaceHolder2_GridView1 
      style="WIDTH:70%; BORDER-COLLAPSE: collapse" cellSpacing=0 rules=all 
      border=1>
      
      
       <div id="formwrapper">

	<form action="updateemplist.action?id=${updateemplist.userId}"  method="post" name="apForm" id="apForm">
	<fieldset>
		<legend>更新用户信息</legend>
		
		<div>
		<label for="Name" ></label>
			<input type="hidden" name="userid" value="${updateemplist.userId }" onblur="vilidateUser();"  id="userId" maxlength="20" /> 
		</div>
		<br />
		<div>	
		<label for="Name">用户名</label>
			<input type="text" name="username" value="${updateemplist.userName }" onblur="vilidateUser();"  id="userId" maxlength="20" /> 
			
		<br />	
	</div>
		<div>
		<label for="Name">密码</label>
		<input type="test" name="userpass" value="${updateemplist.userPass }"id="userPass" maxlength="18" /> 
	</div>	
		<div>
		<label for="Name">真实姓名</label>
		<input type="text" name="realname" value="${updateemplist.realName }" id="userName" /> 	
		<div>
		<div>
		
		<label for="Name" >性别</label>
		<input type="radio" name="usersex" disabled="disabled"
		<c:if test="${updateemplist.userSex=='1' }">
		checked="checked" value="1"
		</c:if>
		 id="userName" /> 男	
		<input type="radio" name="usersex1" disabled="disabled"
		<c:if test="${updateemplist.userSex=='2' }">
		checked="checked" value="2"
		</c:if> id="userName" /> 女
		<div>
		
		<div>
		<label for="Name">年龄</label>
		<input type="text" name="userage" value="${updateemplist.userAge }" id="userName" /> 	
		<div>
		
		<div>
		<label for="Name">学历</label>
		<select>
			<option value="">请选择</option>
			<option value="1">大专</option>
			<option value="2">本科</option>
			
		</select>
		<div>
		
		<div>
		<label for="Name">机构</label>
			<select>
			<option value="">请选择</option>
			<c:forEach items="${selectoption}" var="o">
			<option >${o.orgName }</option>
			</c:forEach>
		</select>	
		<div>
		
		<div>
		<label for="Name">部门</label>
			<select>
			<option value="-1">请选择</option>
			<option value="1"></option>
			<option value="2"></option>

		</select>	
		<div>
		
		<div class="enter">
	    <input id="button" type="submit" class="buttom" value="确认" />
	 
	</div>
	
	</fieldset>
	</form>
</div>     
         
   
                
           
            </TABLE>
          </DIV>
        </TD>
        <TD style="BACKGROUND-IMAGE: url(../images/main_rs.gif)"></TD>
      </TR>
      <TR 
  style="BACKGROUND-IMAGE: url(../images/main_fs.gif); BACKGROUND-REPEAT: repeat-x" 
  height=10>
        <TD style="BACKGROUND-IMAGE: url(../images/main_lf.gif)"></TD>
        <TD style="BACKGROUND-IMAGE: url(../images/main_fs.gif)"></TD>
        <TD 
style="BACKGROUND-IMAGE: url(../images/main_rf.gif)"></TD>
      </TR>
    </TBODY>
  </TABLE>
</DIV>

</BODY>
</HTML>
